package com.globallogic.university.documents;

import com.globallogic.university.people.Teacher;

/**
 * Class represents a curriculum
 * 
 * @author vladyslav.bachurin
 *
 */
public class Curriculum {
	private String curriculumName;
	private Teacher teacher;

	@Override
	public String toString() {
		return "Curriculum [curriculumName=" + curriculumName + ", teacher="
				+ teacher + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((curriculumName == null) ? 0 : curriculumName.hashCode());
		result = prime * result + ((teacher == null) ? 0 : teacher.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Curriculum other = (Curriculum) obj;
		if (curriculumName == null) {
			if (other.curriculumName != null)
				return false;
		} else if (!curriculumName.equals(other.curriculumName))
			return false;
		if (teacher == null) {
			if (other.teacher != null)
				return false;
		} else if (!teacher.equals(other.teacher))
			return false;
		return true;
	}

	public String getCurriculumName() {
		return curriculumName;
	}

	public void setCurriculumName(String curriculumName) {
		this.curriculumName = curriculumName;
	}

	public Teacher getCurriculumTeacher() {
		return teacher;
	}

	public void setCurriculumTeacher(Teacher teacher) {
		this.teacher = teacher;
	}
}
